<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>colord - Frequently Asked Questions</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
<link rel="shortcut icon" href="favicon.ico"/>
</head>
<body>

<p>Back to the <a href="index.html">main page</a></p>

<h1>Frequently asked questions</h1>

<h2>Table Of Contents</h2>
<ul>
<li><a href="#spelling">Can I type colord with leading upper case 'C'?</a></li>
<li><a href="#versions">What do the version numbers mean?</a></li>
<li><a href="#gcm">How does colord interface with the session?</a></li>
<li><a href="#XRandR13">Are XRandR 1.2 devices still supported?</a></li>
<li><a href="#imageloading">Does colord or GNOME Color Manager convert my image?</a></li>
<li><a href="#whydbnotxml">Why are the mappings stored in a database, not readable XML files?</a></li>
<li><a href="#nvidia-driver">Does calibration work with the NVIDIA binary driver?</a></li>
<li><a href="#cmm-cmf-cms">What is the difference between a CMM, CMF and a CMS?</a></li>
<li><a href="#sensors">What is a native sensor?</a></li>
<li><a href="#application">How would an application like Simple Scan use colord?</a></li>
<li><a href="#qualifiers">What is a qualifier used for?</a></li>
<li><a href="#daemon">How do system daemons add devices and profiles?</a></li>
<li><a href="#cups">How would a system daemon like CUPS use colord?</a></li>
<li><a href="#translation">How do I translate colord?</a></li>
<li><a href="#corporate-sponsor">Is there an organization sponsoring development of colord?</a></li>
<li><a href="#oyranos">What's the difference between colord and Oyranos?</a></li>
<li><a href="#why-root">Does the daemon run as root?</a></li>
<li><a href="#application-support">What desktop applications support color management?</a></li>
<li><a href="#help">>How can I help??</a></li>
</ul>

<hr/>
<h3><a name="spelling">Can I type colord with leading upper case 'C'</a></h3>
<p>
No.
</p>

<hr/>
<h3><a name="versions">What do the version numbers mean</a></h3>
<p>
Version numbers are of the form <b>${major}</b>.<b>${minor}</b>.<b>${micro}</b>.
</p>
<center>
<table cellpadding="5px">
<tr><th>Git Branch</th><th>Version Numbers</th><th>Maintained Status</th></tr>
<tr><td><code>colord-0-1</code></td><td><code>0.1.*</code></td><td><code>obsolete</code></td></tr>
<tr><td><code>colord-1-0</code></td><td><code>1.0.*</code></td><td><code>stable</code>, getting backported fixes</td></tr>
<tr><td><code>master</code></td><td><code>1.1.*</code></td><td><code>unstable</code>, getting fixes and new features</td></tr>
</table>
</center>
<p>
Branches with the status <code>stable</code> are suitable for distributions like SLED
and RHEL and are 100% ABI and API stable. Translatable source strings will not be
added or modified and dependency versions will not be updated.
Tarball releases from this branch should be considered safe to push to users as
normal updates.
</p>
<p>
Branches with the status <code>unstable</code> are suitable for distributions like Fedora
or jhbuild and are potentially ABI and API unstable and will contain new
features, refactoring or new translatable strings where required.
Tarball releases from this branch should be QA'd before pushing to users
as test updates.
</p>
<p>
Branches with the status <code>obsolete</code> do not get backported fixes,
although may get security fixes backported if it is practical to do so.
</p>
<p>
Every 6 months (roughly aligned to the GNOME release schedule) we will branch
a new minor version from master, so the new stable version is 1.(n+1).0
and the new unstable version is 1.(n+2).0.
This means that even minor versions are stable, odd are unstable.
</p>
<p>

<hr/>
<h3><a name="gcm">How does colord interface with the session?</a></h3>
<p>
At start-up either gnome-settings-daemon or colord-kde has to create profiles
and devices and otherwise act as the helper agent for colord in the user session.
The session client has to do the following 6 things:
</p>
<ul>
<li>
 Call <code>CreateDevice</code> for each connected XRandR screen and
 watch for changes to the screen.
</li>
<li>
 Create an ICC profile file for each XRandR device using the EDID
 primary information and store it in the home directory.
</li>
<li>
 Call <code>CreateProfile</code> for each profile found in the home
 directory.</li>
<li>
 For each <code>::profile-added</code> event check if the
 <code>EDID_md5</code> metadata matches any XRandR devices.
 If it does, then it needs to call <code>Device.AddProfile()</code>
</li>
<li>
 For each <code>::device-added</code> event check if the device
 <code>modified</code> property is beyond a set threshold.
 If it is, show a notification that the user should calibrate the device.
</li>
<li>
 For each <code>::device-added</code> event from a XRandR device,
 get the default profile and push the gamma ramp to the X output.
</li>
</ul>


<hr/>
<h3><a name="XRandR13">Are XRandR 1.2 devices still supported?</a></h3>
<p>
No. XRandR 1.3 is required to do per-output gamma correction.
</p>

<hr/>
<h3><a name="imageloading">Does colord or GNOME Color Manager convert my image?</a></h3>
<p>
You can use the <a href="https://github.com/hughsie/colord/blob/master/lib/colord/cd-transform.c#L22">CdTransform</a>
object in <a href="https://www.freedesktop.org/software/colord/gtk-doc/">libcolord</a>
for simple RGB->RGB transforms.
You need to use a pixel conversion library, for instance
<a href="http://www.littlecms.com/">lcms2</a> for anything more complicated.
</p>

<hr/>
<h3><a name="whydbnotxml">Why are the mappings stored in a database, not readable XML files?</a></h3>
<p>
If you have a registry that more than one program is changing, you
<b>need</b> locking.
Locking with plain files is neither fun nor reliable.
From a raw performance point of view, it's two orders of magnitude
faster to mmap a single 20k sqlite .db file than it is to read 200
small XML files from the file system.
</p>
<p>
The session needs to <b>query</b> things like <i>give me all the
profiles for device $foo</i> and <i>find all the devices that use
profile $bar</i> which is why we should be using a database, rather than
searching discrete files on the file system every time the session asks
for data.
</p>
<p>
If we're <i>exchanging</i> files between users, then single files do
start to make sense.
I don't personally see a use case where I want to exchange low level
device->profile settings data with somebody else.
A chain of settings from document to printer would be a very useful
thing, but this is what you generate for a process and ship, rather
than copy from the file system unchanged.
</p>
<p>
Having power users <i>tweaking</i> the mapping is something that does
not make good design.
These people can use the <code>colormgr</code> command line client to
add and remove mappings, and to append qualifiers to certain profiles in
a safe abstracted way.
</p>

<hr/>
<h3><a name="nvidia-driver">Does calibration work with the NVIDIA binary driver?</a></h3>
<p>
The binary driver from NVIDIA only supports XRandR 1.2, which means that
it does not support per-monitor gamma tables.
This means we can only send gamma correction tables to the screen, which
means multiple monitor would not be supported.
</p>
<p>
As the driver has no source code, we can't fix this and have to wait for
NVIDIA to release a fixed version of their driver.
Nowadays the open source nouveau driver provides a much better
experience for NVIDIA hardware, and gnome-color-manager of course works
flawlessly with all of the open source drivers.
</p>

<hr/>
<h3><a name="cmm-cmf-cms">What is the difference between a CMM, CMF and a CMS?</a></h3>
<p>
A CMM (Color Management Module) is the software component that takes the
pixels in an image and converts them from one colorspace to another.
There are several CMM engines in existence, both free and proprietary.
Free CMM engines include ArgyllCMS and lcms2, of which the latter is
used heavily by colord and both are used by gnome-color-manager.
</p>
<p>
A CMF (Color Management Framework) is a software component that allows
applications to register devices and profiles, and also allows
applications to query what profiles to use for a device.
A CMF is a higher logical layer component to a CMM engine -- in this
way, colord aims to be primarily a CMF, and is not a full featured CMM.
</p>
<p>
It is the authors opinion that the abbreviation CMS is a heavily
overloaded term (in that ArgyllCMS and L[ittle]CMS include them in their
name), but do not actually provide a system framework for other
applications to use.
In casual usage, both LCMS and colord exhibit some parts of a complete
CMS, and in this way CMS is often used as a general term for both a
CMM and a CMF.
</p>

<hr/>
<h3><a name="sensors">What is a native sensor?</a></h3>
<p>
A native sensor is a calibration device such as a colorimeter or
photospectrometer that colord knows how to interface with.
</p>
<p>
Many sensor makes and models are recognised, and are available to be used
by programs such as <a href="http://www.argyllcms.com/">ArgyllCMS</a>.
The following sensors have native drivers and do not need to spawn ArgyllCMS to
take readings:
</p>
<ul>
<li><a href="http://www.pantone.co.uk/pages/products/product.aspx?pid=562">Pantone Huey</a></li>
<li>Hughski ColorHug (<a href="https://blogs.gnome.org/hughsie/2018/02/01/no-new-batches-of-colorhug2/">no longer produced</a>)</li>
<li><a href="http://www.xrite.com/product_overview.aspx?Action=support&ID=730">XRite DTP94</a></li>
</ul>
</p>
<p>
A native driver allows colord to lock the device, read a sample from the
sensors (or from the ambient light sensor) and unlock the device.
A native device allows client programs to get samples from the device
trivially using either raw D-Bus or libcolord without relying on external
programs.
</p>

<hr/>
<h3><a name="qualifiers">What is a qualifier used for?</a></h3>
<p>
A qualifier is a single string with three sub-strings joined with dots.
For example, <code>RGB.Glossy.300dpi</code> would be the qualifier on
a profile for a RGB device, printing on glossy paper and at 300 dots-per-inch.
</p>
<p>
Qualifiers are assigned to a profile either by CUPS itself or by the user
and this allows CUPS to choose the correct profile for a given print job.
The sub-strings are tried in preference order, so that for a print job
of type <code>RGB.Glossy.300dpi</code> the following fallbacks would be
used:
</p>
<ol>
<li><code>RGB.Glossy.300dpi</code></li>
<li><code>RGB.Glossy.*</code></li>
<li><code>RGB.*.300dpi</code></li>
<li><code>RGB.*.*</code></li>
<li><code>*</code></li>
</ol>
<p>
The fallback scheme allows one profile to potentially match lots of
different print conditions, as very few users will have more than
a couple of different printer profiles.
</p>
<p>
The tri-dotted notation was chosen in preference to JSON or XML as it
is <a href="http://www.cups.org/documentation.php/doc-1.4/spec-ppd.html#cupsICCProfile">
already being used by CUPS</a> in the <code>cupsICCProfile</code> PPD
Extensions format.
</p>

<hr/>
<h3><a name="application">How would an application like Simple Scan use colord?</a></h3>
<p>
It's actually really easy.
Simple Scan already knows the <code>SANE_Device</code> object of the
scanner that it wants to use.
From the <code>SANE_Device</code> object we can easily get the
<i>device_id</i> for the color managed device in colord.
To do this, refer to the <a href="git://github.com/hughsie/colord.git/blobs/master/doc/device-and-profile-naming-spec.txt">
device and profile specification</a> for scanner devices.
This specifies the <i>device_id</i> for a sane device is made up from
<code>"sane_" + sane_device->model</code>.
</p>
<p>
We can now query colord using <a href="http://colord.hughsie.com/api/">
libcolord</a> for the device that matches this ID:
</p>
<pre>
    CdClient *client = NULL;
    CdDevice *device = NULL;
    CdProfile *profile = NULL;
    GError *error = NULL;

    /* create a connection to colord */
    client = cd_client_new ();

    /* find the device for a specific ID */
    device = cd_client_find_device_sync (client, device_id, NULL, &amp;error);
    if (device == NULL) {
        g_warning ("failed to find a device in colord: %s,
                   error->message);
        g_error_free (error);
        goto out;
    }

    /* get the default profile for this device */
    profile = cd_device_get_default_profile (device);
    if (profile == NULL)
        goto out;

    /* TODO: use lcms to convert the scanned image */
    g_message ("need to use: %s", cd_profile_get_filename (profile));
out:
    if (profile != NULL)
        g_object_unref (profile);
    if (device != NULL)
        g_object_unref (device);
    g_object_unref (client);
</pre>
<p>
If you're not happy gaining an additional dependency of libcolord, then
it's also pretty easy to use raw D-Bus calls to do the same thing.
See the <a href="git://github.com/hughsie/colord.git/trees/master/examples">
examples</a> folder for some code samples.
</p>

<hr/>
<h3><a name="daemon">How do system daemons add devices and profiles?</a></h3>
<p>
Like this:
</p>
<pre>
    for device in self.devices:
        o = CreateDevice(device.name)
        for profile in device.profiles:
            p = AddProfile(profile.id)
            if profile.icc_filename:
                p.SetFilename(profile.icc_filename)
            p.SetQualifier(profile.qualifier)
            o.AddProfile(p)
</pre>

<hr/>
<h3><a name="cups">How would a system daemon like CUPS use colord?</a></h3>
<p>
Like this:
</p>
<pre>
    d = FindDeviceById(device.name)
    if d:
        p = d.GetProfileForQualifier(qualifier)
        if p:
            p.Use()
</pre>

<hr/>
<h3><a name="translation">How do I translate colord?</a></h3>
<p>
See the <a href="https://www.transifex.com/projects/p/colord/">colord Transifex</a>
pages for how to contribute to localisation.
</p>

<hr/>
<h3><a name="corporate-sponsor">Is there an organization or corporation sponsoring development of colord?</a></h3>
<p>
colord is not sponsored by anyone, although
<a href="http://www.redhat.com">Red Hat</a> gives me the time to
work on random open source projects. Thanks!
</p>

<hr/>
<h3><a name="oyranos">What's the difference between colord and Oyranos?</a></h3>
<p>
On the surface, <a href="http://www.oyranos.org/">Oyranos</a> and colord
look like similar projects.
I'm not going to be able to write an unbiased comparison against colord and
Oyranos (as the author of the former) but I've supplied the table below which
hopefully helps.
</p>
<table class="noteinformation">
 <tr><th></th><th>Oyranos</th><th>colord</th></tr>
 <tr><td>Portability</td><td>Windows, Linux, OSX</td><td>Linux, FreeBSD<i>[1]</i></td></tr>
 <tr>
  <td>Desktop support</td>
  <td>
   <a href="http://www.fltk.org/">FLTK</a> (native) and
   <a href="http://www.oyranos.org/kolormanager/">KDE</a>
  </td>
  <td>
   <a href="http://www.gnome.org/">GNOME</a>,
   <a href="https://dantti.wordpress.com/2012/03/12/coloring-you-desktop-with-colord-kde/">KDE</a>
   and <a href="https://github.com/agalakhov/xiccd">XFCE, LXDE, MATE</a>
  </td>
 </tr>
 <tr>
   <td>Client access</td>
   <td>C</td>
   <td>
    C, <a href="https://www.freedesktop.org/wiki/Software/dbus">DBus</a> (native),
    all others via <a href="https://live.gnome.org/GObjectIntrospection">GObject Introspection</a>
   </td>
  </tr>
 <tr><td>Client library</td><td>Synchronous, and not MT-safe</td><td>Synchronous, asynchronous and MT safe</td></tr>
 <tr>
   <td>Lines of code</td><td><a href="https://www.ohloh.net/p/oyranos">151k</a></td>
   <td><a href="https://www.ohloh.net/p/colord">46k</a></td>
  </tr>
 <tr>
  <td>Memory allocation</td>
  <td>custom</td>
  <td><a href="https://en.wikipedia.org/wiki/GLib">GLib</a></td>
 </tr>
 <tr>
  <td>Object system</td>
  <td>custom</td>
  <td><a href="https://en.wikipedia.org/wiki/GObject">GObject</a></td>
 </tr>
 <tr><td>Build system</td><td>custom</td><td>automake</td></tr>
 <tr>
  <td>Settings store</td>
  <td><a href="https://www.ohloh.net/p/7750">elektra</a> <i>[2]</i></td>
  <td><a href="https://www.sqlite.org/">sqlite</a></td>
 </tr>
 <tr>
  <td>Session presentation</td>
  <td><i>photographer</i>, <i>prepress</i> and <i>designer</i></td>
  <td>None <i>[3]</i></td>
  </tr>
 <tr>
  <td>Full screen color management</td>
  <td><a href="http://www.compiz.org/">Compiz</a>, using X atoms as IPC</td>
  <td><a href="http://wayland.freedesktop.org/">Wayland</a> with subsurfaces used as opt-out areas (WIP)</td>
 </tr>
 <tr><td>Project age</td><td>9 years</td><td>3 years</td></tr>
 <tr>
  <td>Required by</td>
  <td valign="top">
   <ul>
    <li><a href="http://www.oyranos.org/wiki/index.php?title=ICC_Examin">icc_examin</a></li>
    <li><a href="http://www.oyranos.org/kolormanager/">Kolor Manager</a></li>
    <li><a href="http://www.cinepaint.org/">CinePaint</a> (<a href="http://www.ohloh.net/p/cinepaint">obsolete</a>)</li>
   </ul>
  </td>
  <td>
   <ul>
    <li><a href="http://www.cups.org/">CUPS</a></li>
    <li><a href="https://en.wikipedia.org/wiki/Foomatic">Foomatic</a></li>
    <li><a href="http://www.gtk.org/">GTK+</a></li>
    <li><a href="https://dantti.wordpress.com/2012/03/12/coloring-you-desktop-with-colord-kde/">colord-kde</a></li>
    <li><a href="http://www.gnome.org/">gnome-control-center</a></li>
    <li><a href="http://www.gnome.org/">gnome-settings-daemon</a></li>
    <li><a href="https://github.com/agalakhov/xiccd">xiccd</a></li>
    <li><a href="https://mail.gnome.org/mailman/listinfo/gnome-color-manager-list">GNOME Color Manager</a></li>
    <li><a href="https://lwn.net/Articles/377063/">Simple Scan</a></li>
    <li><a href="http://jonls.dk/redshift/">redshift</a></li>
    <li><a href="https://github.com/hughski/colorhug-client/">colorhug-client</a></li>
   </ul>
  </td>
 </tr>
</table>
<p>
 Notes:
</p>
<ol>
 <li>
  In my opinion, it is better to leverage the native color management
  stack for each operating system, for instance, using Windows Color
  System on win32, and ColorSync on OSX rather than try to install
  alongside the existing frameworks.
 </li>
 <li>
  Elektra <i>could</i> be replaced by another configuration engine.
  </li>
 <li>
  This no user profile system in colord as users vary rarely sit into
  well defined groups and putting profiles in the UI abstracts the
  settings one stage further from what the desktop user is trying to
  achieve.
 </li>
</ol>
<p>
</p>
<p>
</p>

<hr/>
<h3><a name="why-root">Does the daemon run as root?</a></h3>
<p>
Since version 0.1.12 (released August 2011) colord runs as the
<i>colord</i> user, not <i>root</i> &#151; if you're still running this or
an older version please file a bug with your distribution to get it to
upgrade the package to something more modern!
</p>
<p>
The original reason for running as the root user was to check the PolicyKit
authorisation request, but PolicyKit 0.104 (released October 2011)
added functionality to allow non-root daemons to do this as well.
</p>

<hr/>
<h3><a name="application-support">What desktop applications support color management</a></h3>
<p>
Applications can query colord directly, or can use the per-session
<a href="http://www.oyranos.org/wiki/index.php?title=ICC_Profiles_in_X_Specification_0.4">
<code>_ICC_PROFILE</code> X atom</a>.
</p>
<table class="noteinformation">
<tr><th>Software</th><th>colord support</th><th>_ICC_PROFILE support</th><th>Notes</th></tr>
<tr><td><a href="http://www.gtk.org/">GTK+</a></td><td>Yes</td><td>No</td><td>Only the print dialog</td></tr>
<tr><td><a href="https://lwn.net/Articles/377063/">Simple Scan</a></td><td>Yes</td><td>No</td><td></td></tr>
<tr><td><a href="http://www.gimp.org/">GIMP</a></td><td>No</td><td>Yes</td><td>Need to enable it before use</td></tr>
<tr><td><a href="https://www.mozilla.org/en-US/">Firefox</a></td><td>No</td><td>Yes</td><td>Need to enable it before use</td></tr>
<tr><td><a href="http://projects.gnome.org/eog/">Eye of GNOME</a></td><td>No</td><td>Yes</td><td></td></tr>
<tr><td><a href="http://www.darktable.org/">Darktable</a></td><td>Yes</td><td>Yes</td><td></td></tr>
<tr><td><a href="http://krita.org/">Krita</a></td><td>No</td><td>Yes</td><td></td></tr>
<tr><td><a href="http://www.calligra-suite.org/">Calligra</a></td><td>No</td><td>Yes</td><td></td></tr>
<tr><td><a href="http://www.digikam.org/">Digikam</a></td><td>No</td><td>Yes</td><td>Need to enable it before use</td></tr>
<tr><td><a href="http://ufraw.sourceforge.net/">UFRaw</a></td><td>No</td><td>Yes</td><td></td></tr>
<tr><td><a href="http://inkscape.org/">Inkscape</a></td><td>No</td><td>Yes</td><td></td></tr>
<tr><td><a href="http://entangle-photo.org/">Entangle</a></td><td>No</td><td>Yes</td><td></td></tr>
</table>

<hr/>
<h3><a name="help">How can I help?</a></h3>
<p>
Anyone interested in colord development is invited to join the
channel <code>#gnome-color-manager</code> on <code>irc.gnome.org</code>.
We are a friendly bunch, and can answer questions on D-Bus interfaces,
general lcms questions or anything else colord related.
</p>

<p>Back to the <a href="index.html">main page</a></p>

<p class="footer">
 Copyright <a href="mailto:richard@hughsie.com">Richard Hughes 2011 - 2013</a><br/>
 <a href="http://validator.w3.org/check/referer">Optimized</a>
 for <a href="http://www.w3.org/">standards</a>.
</p>

</body>
</html>

